package com.chenyue.cm.common.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 定时任务公共类
 * </p>
 *
 * @author Lbx
 * @since 2021-09-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("jd_common_cron")
@ApiModel(value = "JdCommonCron对象", description = "定时任务公共类")
public class JdCommonCron extends Model<JdCommonCron> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "任务类型")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "表达式")
    @TableField("cron")
    private String cron;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date ct;

    @ApiModelProperty(value = "设定的执行时间")
    @TableField("excute_time")
    private Date excuteTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.UPDATE)
    private Date et;

    @ApiModelProperty(value = "执行任务所需参数")
    @TableField("param")
    private String param;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
